<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
          "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui">
	
	<ui:composition>
		<p:dialog id="metadataDefInputDialog" widgetVar="#{modalDialogWidgetVar}" resizable="false" modal="true"
			header="#{messages.inc_addmetadatadefinitionmodaldialog_header_label}" >
			<h:form id="metadataDefInputForm" >
				<h:panelGrid columns="2">
					<h:outputLabel id="metadefNameLabel" for="metadefNameInput" 
						value="#{messages.inc_addmetadatadefinitionmodaldialog_metadatadefname_label}:" />
					<h:inputText id="metadefNameInput" value="#{embeddedMetadataValueInputBeanSubClass.metadataDefName}" 
						validator="#{embeddedMetadataValueInputBeanSubClass.checkNameForCategory}" required="true" requiredMessage="#{messages.input_required}" />
				</h:panelGrid>
				<!-- Be noticed, that the javascript for closing the modalDialog is done via the Primefaces RequestContext inside the Bean-ActionMethod  -->
					<p:commandButton id="addMetadataDefInputButton" value="#{messages.save}" action="#{embeddedMetadataValueInputBeanSubClass.saveMetadataDefinition}"
						partialSubmit="true" process="@form" update="@form #{outerIdsToUpdate}" />
				<p:message id="metadefNameMsg" for="metadefNameInput"/>
			</h:form>
		</p:dialog>
	</ui:composition>
</html>